<table>
    <tr>
        <td>INDEX</td>
        {% for fld in fields %}
        <td>{{fld}}</td>
        {% endfor %}
    </tr>
    {% for idx, row in enumerate(values) %}
    <tr>
        <td>{{idx}}</td>
        {% for col in fields %}
        <td>{{getattr(row, col)}}</td>
        {% endfor %}
    </tr>
    {% endfor %}
</table>
